import { of, Observable, fromEvent } from 'rxjs';
import { filter, map } from 'rxjs/operators';

fromEvent<MouseEvent>(document, 'click')
  .pipe(
    filter((_, index) => index % 2 === 0),
    map((event: MouseEvent) => ({ x: event.x, y: event.y }))
  )
  .subscribe((data) => console.log(data));
of(1).subscribe((data) => console.log(data));
// Open the console in the bottom right to see results.
console.log(11111);
